<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>沂水旅游-景点列表</title>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/static/layuiadmin/layui/css/layui.css">
    <link rel="stylesheet" href="/static/index/css/base.css">
    <link rel="stylesheet" href="/static/index/css/tourList.css">
</head>
<body>

{include file="public/header" model='tour' /}

<div class="searchBox">
    <div class="layui-container">
        <div class="mianbaoxie-nav">
            <span class="layui-breadcrumb">
              <a href="/">首页</a>
              <a><cite>景点列表</cite></a>
            </span>
        </div>

        <div class="layui-row">
            <div class="layui-col-md8">
                <div class="layui-row">
                    <div class="layui-col-md2">
                        <a href="{:url('tour/tourList')}">
                            <div class="search-kind-box">
                                <div class="kinds-icon kinds-icon-1 tour-kinds-icon-1"></div>
                                <div class="kinds-title">所有类型</div>
                            </div>
                        </a>
                    </div>
                    <div class="layui-col-md2">
                        <a href="{:url('tour/tourList')}?kinds=1">
                            <div class="search-kind-box">
                                <div class="kinds-icon kinds-icon-1 tour-kinds-icon-2"></div>
                                <div class="kinds-title">人文景观</div>
                            </div>
                        </a>
                    </div>
                    <div class="layui-col-md2">
                        <a href="{:url('tour/tourList')}?kinds=2">
                            <div class="search-kind-box">
                                <div class="kinds-icon kinds-icon-1 tour-kinds-icon-3"></div>
                                <div class="kinds-title">自然景观</div>
                            </div>
                        </a>
                    </div>
                    <div class="layui-col-md2">
                        <a href="{:url('tour/tourList')}?kinds=3">
                            <div class="search-kind-box">
                                <div class="kinds-icon kinds-icon-1 tour-kinds-icon-4"></div>
                                <div class="kinds-title">温泉度假</div>
                            </div>
                        </a>
                    </div>
                    <div class="layui-col-md2">
                        <a href="{:url('tour/tourList')}?kinds=4">
                            <div class="search-kind-box">
                                <div class="kinds-icon kinds-icon-1 tour-kinds-icon-5"></div>
                                <div class="kinds-title">亲子游乐</div>
                            </div>
                        </a>
                    </div>
                </div>
            </div>
        </div>

    </div>

</div>

<div class="tour_box">
    <div class="layui-container">
        <div class="layui-row  layui-col-space30">

            {volist name='list' id='vo'}
            <a href="{:url('tour/tour',['id'=>$vo.tour_id])}">
                <div class="layui-col-md12 tour_li">
                    <div class="layui-row layui-col-space30">
                        <div class="layui-col-md5">
                            <div class="tour_title_box">
                                <h1 class="tour_title">{$vo.tour_name}</h1>
                                <span class="tour_rate">好评率{$vo.rate}%</span>
                            </div>

                            <div class="tour_mark">
                                {foreach $vo.tour_tag as $key => $value}
                                <span>{$value}</span>
                                {/foreach}
                            </div>

                            <div class="tour_price">
                                {neq name="$vo.minprice" value="暂无"}
                                    <h1><span>￥</span>{$vo.minprice}<span>起</span></h1>
                                {else/}
                                    <h1>暂无价格</h1>
                                {/neq}
                                <p>已售{$vo.sale_sum}</p>
                            </div>

                            <div class="tour_content">
                                {$vo.tour_subject}
                            </div>

                        </div>
                        <div class="layui-col-md7">
                            <div class="layui-row layui-col-space10">

                                <div class="layui-col-md8">
                                    <div class="tour_l_img">

                                        {notempty name="vo.img[0]['img_path']"}
                                        <img lay-src="{$vo.img[0]['img_path']}" alt="">
                                        {/notempty}

                                    </div>
                                </div>
                                <div class="layui-col-md4">
                                    <div class="tour_r_img" style="margin-bottom: 10px;">
                                        {notempty name="vo.img[1]['img_path']"}
                                        <img lay-src="{$vo.img[1]['img_path']}" alt="">
                                        {/notempty}
                                    </div>
                                    <div class="tour_r_img">
                                        {notempty name="vo.img[2]['img_path']"}
                                        <img lay-src="{$vo.img[2]['img_path']}" alt="">
                                        {/notempty}
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </a>
            {/volist}
        </div>

        <div style="padding-top: 60px;">
            {$tour->render()}
        </div>

    </div>
</div>


{include file="public/footer"  /}

<script>
    var $ = layui.jquery;
        var layer = layui.layer
            , element = layui.element
            , carousel = layui.carousel
            , flow = layui.flow
            , form = layui.form;

        flow.lazyimg();
        form.render();
        element.init();

        function getQueryVariable(variable) {
            var query = window.location.search.substring(1);
            var vars = query.split("&");
            for (var i = 0; i < vars.length; i++) {
                var pair = vars[i].split("=");
                if (pair[0] == variable) {
                    return pair[1];
                }
            }
            return (false);
        }

        var kinds = getQueryVariable('kinds');

        if (kinds) {

            switch (kinds * 1) {
                case 1:
                    $('.tour-kinds-icon-2').parent().addClass('search-kind-box-active');
                    break;
                case 2:
                    $('.tour-kinds-icon-3').parent().addClass('search-kind-box-active');
                    break;

                case 3:
                    $('.tour-kinds-icon-4').parent().addClass('search-kind-box-active');
                    break;

                case 4:
                    $('.tour-kinds-icon-5').parent().addClass('search-kind-box-active');
                    break;
                default:
                    $('.tour-kinds-icon-1').parent().addClass('search-kind-box-active');

            }

        } else {

            $('.tour-kinds-icon-1').parent().addClass('search-kind-box-active');

        }

</script>
</body>
</html>